package org.ly817.busCode.core.client;

import org.ly817.busCode.core.ServiceCenter;
import org.ly817.busCode.protocol.enums.CallType;
import org.ly817.busCode.protocol.protobuf.BusCode;

/**
 * @author LuoYu
 * @date 2019/02/20 10:51
 * <p>
 * Description:
 * 服务调用地址构建工具类
 * 对BusCode.busMsg构造操作的封装
 *
 */
public class Call {

    private static final String BUSCODE_PREFIX = "BUS";

    private static ServiceCenter serviceCenter = new ServiceCenter();

    private CallType callType;

    /**
     * TODO 构建busCode
     * @param code int类型的服务代码
     */
    public static BusCode.busMsg busCode(String code) {
        // 字符串合规校验
        // 创建protobuf消息体
        return BusCode.busMsg.newBuilder()
                .setBusCode(BUSCODE_PREFIX + code).build();
    }


    /**
     *
     * @param serviceName 服务命名
     */
    public static String service(String serviceName){
        return "";
    }
}
